﻿using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LF.Domain.Entities
{
    public class KnowledgeFile:BaseEntity
    {

        
        /// <summary>
        /// 文件名
        /// </summary>
        public string FileName { set; get; }
        /// <summary>
        /// 文件后缀
        /// </summary>
        public string Suffix {  get; set; }
        /// <summary>
        /// 文件大小(KB)
        /// </summary>
        public int Size {  get; set; }
        /// <summary>
        /// 文件MD5值
        /// </summary>
        public string FileMD5 {  get; set; }
        /// <summary>
        /// 所属知识库ID
        /// </summary>
        public Guid KnowledgeBaseId { get; set; }
        /// <summary>
        /// 所属知识库
        /// </summary>
        [Navigate(nameof(KnowledgeBaseId))]
        public virtual KnowledgeBase KnowledgeBase { get; set; }
        
        /// <summary>
        /// 切片方式：0、固定长度 1、QA问答 2、段落
        /// </summary>
        public int SliceType { get; set; }
        
        /// <summary>
        /// 固定长度大小，当SliceType=0时使用
        /// </summary>
        public int? FixedLength { get; set; }

        /// <summary>
        /// 是否已向量化
        /// </summary>
        public bool IsEmbedding { get; set; }
    }
}
